package com.bf.electroplating.pojo.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MachineStatusEnums {


    ON("1","在线"),
    OFF("2", "离线"),
;

    private final String code;
    private final String desc;



    public static String getDesc(String code) {
        for (MachineStatusEnums item : MachineStatusEnums.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }
}
